package cn.com.api.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import cn.com.api.entity.*;
import cn.com.util.*;

@Service
public interface ApiShopsService {
	// 根据ID查询店铺详情
	public List<ApiShop> getShops(Integer sid);

	// 查询我收藏的商店
	public List<ApiShop> searchMyShops(@Param("u_id") String u_id);

	// 根据店铺手机号码修改密码
	public ApiShop forgetPwd(ApiShop shop, ApiSmslog apiSmslog);

	// 查询所有店铺
	public List<ApiShop> findShops();

	public List<ApiShop> findShopsAll();

	// 条件查询
	public List<ApiShop> searCondition(Map<String, Object> cond, PageInfo pageInfo);

	// 根据店铺id获取商铺信息
	public ApiShop findShopByCid(String cId);

	public Map<String, Object> findShopByShopId(String shopid);

	// 根据店铺手机号码获取商铺信息
	public ApiShop findShopByCmobi(String c_mobi);

	public ApiShop searchShopsZiYingByCityId(String city_id);

	// 登录
	public ApiShop login(ApiShop shop);

	// 根据类型获取商店列表
	public void searchShopsByType(Map<String, String> params, Map<String, Object> map);

	public List<ApiShop> searchShops(Map<String, Object> conditions);

	// 查询已审核的店铺
	public List<ApiShop> searchShopsByEnable(Integer cEnable);

	// 根据id查看
	public ApiShop findT_shopsById(Integer c_id);

	// 添加
	public int insertT_shops(ApiShop t_shops);

	// 修改
	public int updateT_shops(ApiShop t_shops);

	// 修改商家密码
	public int modifyPass_shops(ApiShop t_shops);

	// 删除
	public int deleteT_shops(Integer c_id);

	// 更新营业状态
	public Map<String, Object> updateIsOpen(String open, String shopid);

	// 根据条件查询商铺
	public List<ApiShop> searchShopByCondition(Map<String, Object> map);

	public Integer searType(String shopid);

	// 获取商户当日有效订单和订单总金额
	public ApiShopTodayStats getShopOrderAccount(Integer shop_id);

	// 获取商户当日有效订单和订单总金额
	public ApiShopTodayStats getShopOrderAccountDay(Integer shop_id, String day);

	// 更新电话
	public boolean updateTel(String tel, String id);

	// 提现申请
	public boolean shopCash(ApiCash apiCash);

	// 提现详情
	public Map<String, Object> cashDetail(String cashid, String token);

	// 每日账单详情
	public Map<String, Object> statDetail(String cashid, String shopid, String token);

	// 更新商家可提现金额和预支付金额
	public boolean updateCashPre(Double cmoney, Double payment, Integer id);

	public Map<String, Object> shopStat(String shopid);

	public Map<String, Object> shopBills(String shopid);

	public List<Map<String, Object>> searCashAll();

	/**
	 * 
	 * @param cashid
	 * @param type
	 *            1:审核通过 2:审核不通过
	 * @return
	 */
	public int cashReview(String cashid, String type);

	// 根据shop_id 查询该店铺的商品
	public void searchGoodsByShopId(Map<String, String> params, Map<String, Object> map);

	// 生活服务--附近的门店
	public void searchNearbyShops(Map<String, String> params, Map<String, Object> map);

	// 根据名称搜索店铺
	public void searchShopsByShopName(Map<String, String> params, Map<String, Object> map);

	public Integer searByName(String name);

	public boolean updatePreMoney(String money, String id, ApiT_shops_pay_records payRecord, String applyid);

	public List<Map<String, Object>> searShopCad(String sname);

	// 商家订单详情
	public Map<String, Object> searShopOrderDel(String shopid, String rid, String time, String stime, String etime);

	// 根据城市id查询已审核的店铺
	public List<ApiShop> searchShopsByEnableAndCity(String cEnable, String cityid);

	// ---根据店铺id判断店铺是否是衣物干洗 1-是 0-否
	public Integer checkShopIsClothes(Integer shop_id);

	public void autoIsOpen();

	public List<Map<String, Object>> searchMyShopsPage(String u_id, PageInfo page);

	// 获取账单明细
	public List<Map<String, Object>> getshopBillsListPage(Integer getcId, PageInfo pageInfo);

	// 获取报表明细
	public Map<String, Object> shopDateStat(String shopid, String date);

}
